{{- if .Site.Params.viewer -}}
  {{- $options := dict "targetPath" "assets/viewer/bundle.min.js" "minify" hugo.IsProduction -}}
  {{- $script := resources.Get "viewer/js/index.ts" | js.Build $options | fingerprint -}}
  <script data-precache src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{- end -}}
